<?php
class ControllerExceptionLib extends Exception {
    public function __construct($http) {
        //parent::__construct('', $http['status_code']);
        if($http['jump'] === true) {
            $uri = isset($http['params'])&&!empty($http['params']) ? $http['uri'] . '?' . http_build_query($http['params']) : $http['uri'];
            header('Location: ' . $uri, true, $http['code']);
        } else {
            header('http/1.1 ' . $http['code']);
            BaseController::output($http);
        }
    }
}
?>
